package com.xz.stu.server.vo.department;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class DepartmentBaseVO {

    @Schema(description = "院系名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "计算机科学与技术学院")
    @NotBlank(message = "院系名称不能为空")
    @Size(max = 50, message = "院系名称长度不能超过50个字符")
    private String deptName;

    @Schema(description = "院长姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotBlank(message = "院长姓名不能为空")
    @Size(max = 20, message = "院长姓名长度不能超过20个字符")
    private String dean;

    @Schema(description = "办公室电话", example = "13800138000")
    @Pattern(regexp = "^(1\\d{10}|\\d{3,4}-\\d{7,8})$", message = "办公室电话格式不正确")
    private String officePhone;
}
